import 'dart:developer';

import 'package:FlutterDemo/widget/scrollviews/helpers/helper_listview.dart';
import 'package:flutter/material.dart';

class SubSampleListViewSeparatedWidget extends StatefulWidget {
  const SubSampleListViewSeparatedWidget({Key? key}) : super(key: key);

  @override
  _SubSampleListViewSeparatedWidgetState createState() => _SubSampleListViewSeparatedWidgetState();
}

class _SubSampleListViewSeparatedWidgetState extends State<SubSampleListViewSeparatedWidget> {
  List<Widget> _list = [];

  @override
  void initState() {
    super.initState();
    buildListItemsAsync().then((value) {
      setState(() {
        _list.addAll(value);
        log("刷新list界面");
      });
    });
  }

  @override
  Widget build(BuildContext context) {
    return buildSampleListSeparated(_list);
  }
}
